package theFrameworks.desa.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import theFrameworks.desa.dao.EventoDAO;
import theFrameworks.desa.domain.Evento;

@Service("servicioEvento")
public class ServicioEventoImpl implements ServicioEvento{

	private EventoDAO eventoDAO;
	
	@Autowired
	public ServicioEventoImpl(EventoDAO eventoDAO){
		this.eventoDAO=eventoDAO;
		
	}
	
	@Transactional
	public void guardarEvento(Evento evento) {
		eventoDAO.persist(evento);
		
	}

	@Transactional
	public void eliminarEvento(Evento evento) {
		eventoDAO.delete(evento);
	}

}
